<?php
/*
 * Created on Mar 11, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>
<ul id="sitemap">
	<?php if(!empty($nav)): $i = 0;?>
	<?php foreach($nav as $key => $val): $i++;?>
	<li>
		<?php
			$link = implode('/', array("c"=>"home", "m" => "index", "node_id" => $val['id']));
		?>
		<span><a href="" title="<?=htmlentities($val['nav_name'])?>"><?=htmlspecialchars($val['nav_name'])?></a></span>
		<?php $j = 0;if(isset($val['children'])):?>
			<ul>
			<?php foreach($val['children'] as $key1 => $val1): $j++;?>
				<li>
				<?php $link = implode('/', array("c"=>"home", "m" => "index", "node_id" => $val1['id']));?>
				<span><a href="<?=$link?>" target="<?=$target?>"><?=htmlspecialchars($val1['nav_name'])?></a></span>
				<!-- Level 3 -->
				<?php if(isset($val1['children'])):?>
				<ul>
					<?php $k = 0; foreach($val1['children'] as $key2 => $val2): $k++;?>
					<li><?php $link = implode('/', array("c"=>"home", "m" => "index", "node_id" => $val2['id']));?>
						<span><a href="<?= $link?>"><?=htmlspecialchars($val2['nav_name'])?></a></span>
					</li>
					<?php endforeach;?>
				</ul>
				<?php endif;?>
				<!-- End Level 3 -->
			</li>
			<?php endforeach;?></ul>
		<?php endif;?>
	</li>
	<?php endforeach;?>
	<?php endif;?>
</ul>